package com.lczc.soa.config;

import com.lczc.soa.filter.SensitiveWordsFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.ArrayList;

@Configuration
public class WebConfig implements WebMvcConfigurer {
//git Test 1233555

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        LoginInterceptor loginInterceptor = new LoginInterceptor();
        registry.addInterceptor(loginInterceptor).addPathPatterns("/**")
                .excludePathPatterns("/adminlte/**","/logincss/**","/bootstrap-table/**","/js/**",
                        "/Admin/login","/Admin/tologin","/User/tologin","/User/login",
                        "/User/toregister","/User/register");
    }


}
